package com.sinosun.autotestmachine.tools.proxy.callback;

public class NotificationInfo extends CoreInfo implements java.lang.Comparable<NotificationInfo>{
	private String from;
	private String notiContent;
	private String tagId;
	
	public NotificationInfo() {
		super();
		from = new String("");
		notiContent = new String("");
		tagId = new String("");
	}
	
	public void setTagId(String tagId) {
		this.tagId = tagId;
	}
	
	public String getTagId() {
		return this.tagId;
	}
	
	public void setFrom(String from) {
		this.from = from;
	}
	
	public String getFrom() {
		return this.from;
	}
	
	public void setNotiContent(String notiContent) {
		this.notiContent = notiContent;
	}
	
	public String getNotiContent() {
		return this.notiContent;
	}
	
	@Override public int compareTo(NotificationInfo another) {
		NotificationInfo other = (NotificationInfo)another;
		return this.getNotiContent().length() - other.getNotiContent().length();
	}
	
	@Override public boolean equals(Object o){
		NotificationInfo other = (NotificationInfo)o;
		if (other.getNotiContent().equals(this.getNotiContent()) && other.getFrom().equals(this.getFrom())) {
			return true;
		}
		return false;
	}
}
